package com.lb.view;

import com.lb.kugou.R;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class ImageButtonInc extends LinearLayout {

	private TextView text;
	private ImageView src;
	private TypedArray osa;

	public ImageButtonInc(Context context, AttributeSet attrs) {
		super(context, attrs);
		LayoutInflater.from(context).inflate(R.layout.image_button_inc, this);
		osa = context.obtainStyledAttributes(attrs, R.styleable.image_button_inc);
		text = (TextView) findViewById(R.id.text);
		text.setText(osa.getResourceId(R.styleable.image_button_inc_text, R.string.allplay));
		src = (ImageView) findViewById(R.id.src);
		Drawable drawable = context.getResources().getDrawable(osa.getResourceId(R.styleable.image_button_inc_src, R.drawable.skin_image_ic_list_common_bar_header_allplay));
		src.setImageDrawable(drawable);
		osa.recycle();
	}

	@Override
	protected void onLayout(boolean changed, int l, int t, int r, int b) {
		super.onLayout(changed, l, t, r, b);
	}

	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
	}
	
	

}
